package day5;

public class Phone {
    public String brand; // 品牌
    public Cell cell; // 手机的电池

    public void download() {
        if(cell.quantityElectricity < 10) {
            System.out.println("电量不足，请充电!");
            return;
        }
        System.out.println("下载文件..消耗电量10%");
        cell.quantityElectricity -= 10;
    }
    public void playMusic() {
        if(cell.quantityElectricity < 20) {
            System.out.println("电量不足，请充电!");
            return;
        }
        System.out.println("播放音乐..消耗电量20%");
        cell.quantityElectricity -= 20;
    }
}
